home *** CD-ROM | disk | FTP | other *** search
- /*
- File: AIFF_writer.h
-
- Contains: Header for routines which deal with virtual sound hardware from a
- 'sdev' component.
-
- Written by: Mark Cookson
-
- Copyright: Copyright © 1993-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 8/16/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
-
-
- */
-
- #ifndef __AIFFWRITER__
- #define __AIFFWRITER__
-
- #define kHackBlasterSifterID 128
- #define kHackBlasterPanelID 130
- #define kHackBlasterSubType 'hack' /* OS Type for component */
-
- #ifndef forRez
-
- #include <Components.h>
-
- enum {
- kSampleSizesCount = 2, /* no. sample sizes supported */
- kSampleRatesCount = 6, /* no. sample rates supported */
- kChannelsCount = 2 /* no. channels supported */
- };
-
- /* hardware configuration structure */
-
- typedef struct {
- long volume; // current hardware volume
- UnsignedFixed sampleRate; // current sample rate
- short sampleSize; // current sample size
- short numChannels; // current num channels
- short bufferSize; // size of interrupt buffer in samples
- Boolean supportsRateRange; // true if sample rate range supported, false if only discreet rates supported
- Boolean outputToFile; // true to output sound data to AIFF file
- Boolean outputToHardware; // true to play sound
- Boolean dirty; // true if globals need to be saved in prefs file
- short sampleSizes[kSampleSizesCount];
- short sampleSizesActive[kSampleSizesCount];
- unsigned long sampleRateMin;
- unsigned long sampleRateMax;
- unsigned long sampleRates[kSampleRatesCount];
- short sampleRatesActive[kSampleRatesCount];
- short channels[kChannelsCount];
- short channelsActive[kChannelsCount];
- } HardwareGlobals, *HardwareGlobalsPtr;
-
- #endif /* forRez */
- #endif /* __AIFFWRITER__ */